package com.whfc.fse.service;

import com.whfc.common.exception.BizException;
import com.whfc.common.result.PageData;
import com.whfc.fse.dto.FseGantryDTO;
import com.whfc.fse.dto.FseGantryDataDTO;
import com.whfc.fse.dto.FseGantryDataLogDTO;
import com.whfc.fse.param.FseGantryAddParam;
import com.whfc.fse.param.FseGantryBindParam;
import com.whfc.fse.param.FseGantryEditParam;
import com.whfc.fse.param.FseGantryUnbindParam;

import java.util.Date;
import java.util.List;

/**
 * @Description 龙门吊
 * @Author hw
 * @Date 2021-05-31 16:31
 * @Version 1.0
 */
public interface FseGantryService {

    /**
     * 新增龙门吊设备
     *
     * @param param
     * @throws BizException
     */
    void add(FseGantryAddParam param) throws BizException;


    /**
     * 修改龙门吊设备
     *
     * @param param
     * @throws BizException
     */
    void edit(FseGantryEditParam param) throws BizException;

    /**
     * 删除龙门吊
     *
     * @param gantryId
     * @throws BizException
     */
    void del(Integer gantryId) throws BizException;

    /**
     * 龙门吊列表(分页)
     *
     * @param deptId
     * @param keyword
     * @param bindFlag
     * @param netState
     * @param pageNum
     * @param pageSize
     * @return
     * @throws BizException
     */
    PageData<FseGantryDTO> list(Integer deptId, String keyword, Integer bindFlag, Integer netState, Integer pageNum, Integer pageSize) throws BizException;

    /**
     * 龙门吊详情
     *
     * @param gantryId
     * @return
     * @throws BizException
     */
    FseGantryDTO details(Integer gantryId) throws BizException;

    /**
     * 龙门吊列表(不分页)
     *
     * @param deptId
     * @param keyword
     * @param bindFlag
     * @param netState
     * @return
     * @throws BizException
     */
    List<FseGantryDTO> list(Integer deptId, String keyword, Integer bindFlag, Integer netState) throws BizException;

    /**
     * 绑定龙门吊硬件
     *
     * @param param
     * @throws BizException
     */
    void bind(FseGantryBindParam param) throws BizException;


    /**
     * 解绑龙门吊硬件
     *
     * @param param
     * @throws BizException
     */
    void unbind(FseGantryUnbindParam param) throws BizException;

    /**
     * 龙门吊监测
     *
     * @param gantryId
     * @return
     * @throws BizException
     */
    FseGantryDataDTO monitor(Integer gantryId) throws BizException;

    /**
     * 龙门吊历史数据
     *
     * @param gantryId
     * @param time
     * @return
     * @throws BizException
     */
    List<FseGantryDataLogDTO> gantryLog(Integer gantryId, Date time) throws BizException;

}
